filechooser: Fix setting unlisted filters
authorMatthias Clasen <mclasen@redhat.com>
Sun, 13 Sep 2020 05:12:51 +0000 (01:12 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 13 Sep 2020 05:12:51 +0000 (01:12 -0400)
This is documented to work, but it was broken
when we ported things to list models.

gtk/gtkfilechooserwidget.c

index 3e7ed0ccf718989466f5bb8fad791cc587bd0e39..4d24a7c79e0bfa69c261a371a7272a975ac25e2b 100644 (file)
@@ -6856,7 +6856,7 @@ set_current_filter (GtkFileChooserWidget *impl,
       if (filter)
         {
           if (!g_list_store_find (impl->filters, filter, &filter_index))
-            return;
+            filter_index = GTK_INVALID_LIST_POSITION;
         }
       else
         {